import java.util.Arrays;
public class code9_22 {
    public static void func1(int[] array){
        array[0] = 99;
    }
    public static void main(String[] args) {
        int[] array = {1,2,3,4};
        func1(array);
        System.out.println(Arrays.toString(array));
    }

    public static void main8(String[] args) {
        int[] array = {1,2,3,4};
        int[] array2 = {4,5,6,7,8};
        array = array2;
        System.out.println(Arrays.toString(array));
        System.out.println(Arrays.toString(array2));
    }
    public static void main7(String[] args) {
        int[] array = new int[]{1,2,3,4};
        System.out.println(Arrays.toString(array));
        int[] array2 = array;
        array2[2] = 99;
        System.out.println(Arrays.toString(array2));
        System.out.println(Arrays.toString(array));
    }
    public static void main6(String[] args) {
        String str = "hello";
        char[] arr = str.toCharArray();
        System.out.println(arr);
        char[] arr1 = new char[]{'h','e','l','l','o'};
        System.out.println(arr1);
        int[] arr2 = new int[]{1,2,3,4};
        System.out.println(arr2);
    }
    public static void main5(String[] args) {
        char[] arr = new char[]{'h','e','l','l','o'};
        System.out.println(Arrays.toString(arr));
    }
    public static void main4(String[] args) {
        int[] arr = new int[]{1,2,3,4,5,6,7};
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
        System.out.println();
        for (int x:arr) {
            System.out.print(x+" ");
        }

    }
    public static void main3(String[] args) {
        int[] arr = new int[10];
        System.out.println(Arrays.toString(arr));
    }
    public static void main2(String[] args) {
        int[] arr = {1,2,3,4};
        System.out.println(Arrays.toString(arr));
        System.out.println(arr);
    }
    public static void main1(String[] args) {
        int[] arr = {1,2,3,4,5};
        int[] arr1 = new int[]{1,2,3,4,5};
        System.out.println(Arrays.toString(arr));
        System.out.println(Arrays.toString(arr1));
    }
}